// @ts-ignore
/* eslint-disable */
import request from '@/request'

/** addAddress POST /api/address/add */
export async function addAddressUsingPost(
  body: API.AddressAddRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseLong_>('/api/address/add', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** deleteAddress POST /api/address/delete */
export async function deleteAddressUsingPost(
  body: API.DeleteRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>('/api/address/delete', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** getAddressVOById GET /api/address/get/vo */
export async function getAddressVoByIdUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getAddressVOByIdUsingGETParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseAddressVO_>('/api/address/get/vo', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  })
}

/** listAddressByPage POST /api/address/list/page */
export async function listAddressByPageUsingPost(
  body: API.AddressQueryRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponsePageAddress_>('/api/address/list/page', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** listAddressVOByPage POST /api/address/list/page/vo */
export async function listAddressVoByPageUsingPost(
  body: API.AddressQueryRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponsePageAddressVO_>('/api/address/list/page/vo', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** listMyAddressVOByPage GET /api/address/my/list/page/vo */
export async function listMyAddressVoByPageUsingGet(options?: { [key: string]: any }) {
  return request<API.BaseResponseListAddressVO_>('/api/address/my/list/page/vo', {
    method: 'GET',
    ...(options || {}),
  })
}

/** updateAddress POST /api/address/update */
export async function updateAddressUsingPost(
  body: API.AddressUpdateRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>('/api/address/update', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}
